<?php if(!defined('BASEPATH')) exit ('No direct script access allowed');

class Public_Controller extends MY_Controller
{
    function __construct()
    {
        parent::__construct();

        //Set timezone default
        date_default_timezone_set('Asia/Ho_Chi_Minh');

        $this->load->model('person/person_model');
		$this->load->library('fb_api/facebook', array("appId" => $this->config->item('appId') , "secret" => $this->config->item('secret')));
		        
		$this->template->enable_parser(FALSE);
        $this->template->set_partial('header', 'partial/header');
        $this->template->set_partial('header_person', 'partial/header_person', array('infoPerson' => array()));
        $this->template->set_partial('left_menu', 'partial/left_menu');

		$this->lang->load('front');
		$this->rout = $this->router->fetch_class();
		/* PATH TO THEMES
		----------------------------*/
		define('THEMES_PATH', base_url() . 'themes/default/');

		$this->output->enable_profiler(FALSE);

		//Set default value for person info
		$this->current_person_id = '';
    }

	function loadMail()
	{
		$mail_config = array(
			'protocol'		=> 'smtp',
			'smtp_host'		=> $this->config->item('smtp_host'),
			'smtp_user'		=> $this->config->item('smtp_user'),
			'smtp_pass'		=> $this->config->item('smtp_pass'),
			'smtp_port'		=> $this->config->item('smtp_port'),
			'smtp_timeout'	=> $this->config->item('smtp_timeout'),
			'charset'		=> $this->config->item('mail_charset'),
			'wordwrap'		=> $this->config->item('mail_wordwrap'),
			'mailtype'		=> $this->config->item('mailtype')
		);

		$this->load->library('email', $mail_config);

	}

}
/* End of file Pbulic_controller.php */
/* Local: application/core/Public_Controller.php */
